﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductsNew.ascx.cs" Inherits="usercontrol_ProductsDevExpress" %>
<%@ Register Assembly="DevExpress.Web.v9.1" Namespace="DevExpress.Web.ASPxRoundPanel"
    TagPrefix="dxrp" %>
<%@ Register Assembly="DevExpress.Web.v9.1, Version=9.1.3.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxDataView" TagPrefix="dxdv" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.1, Version=9.1.3.0, Culture=neutral, PublicKeyToken=5377c8e3b72b4073"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<%@ Register assembly="DevExpress.Web.v9.1" namespace="DevExpress.Web.ASPxPanel" tagprefix="dxp" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.1" namespace="DevExpress.Web.ASPxEditors" tagprefix="dxe" %>

<div class="menu">
	<div class="hc1 hc1-header">
		<div class="hc1-adverb">
			<asp:Image ID="Image9" runat="server" ImageUrl="~/images/support.png" />
		</div>
		<div class="hc1-text">
			<asp:Label ID="Label5" runat="server" Text="SẢN PHẨM MỚI" CssClass="text_header"></asp:Label>
		</div>        
	</div>
	<div>
		 <dxdv:ASPxDataView ID="ASPxDataView2" runat="server" 
                DataSourceID="SQLDSProducts" EmptyDataText="đang cập nhật..." Width="100%" 
                OnItemCommand="ASPxDataView2_ItemCommand" LoadingPanelText="đang tải..." 
                CssFilePath="~/App_Themes/Youthful/{0}/styles.css" CssPostfix="Youthful" 
                ImageFolder="~/App_Themes/Youthful/{0}/" ItemSpacing="1px" 
                LoadingPanelImagePosition="Bottom" PagerPanelSpacing="0px" 
                OnDataBound="ASPxDataView2_DataBound" ColumnCount="2">
                <ItemTemplate>
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td align="center" colspan="3" valign="top">
                                 <a href="#" onmouseover="Tip('<img src=\'<%# DataBinder.Eval(Container.DataItem,"SmallImageURL").ToString() %> \'')" onmouseout="UnTip()">
                                            <asp:Image ID="imgProduct1" runat="server" Height="203px"
                                            ImageUrl='<%# Eval("SmallImageURL").ToString()%>'
                                            Width="195px" AlternateText="ProductImage" />
                                     </a>               
                                   <%-- <a href="#" onmouseover="Tip('<img src=\'<%#"photos/"+ DataBinder.Eval(Container.DataItem,"ProductID").ToString() + ".jpg" %> \'')" onmouseout="UnTip()">
                                            <asp:Image ID="imgProduct1" runat="server" Height="90px"
                                            ImageUrl='<%# "~/photos/"+ DataBinder.Eval(Container.DataItem,"ProductID").ToString() + ".jpg" %>'
                                            Width="85px" AlternateText="ProductImage" />
                                     </a>               --%>                      
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="3" style="height: 16px">
                                    <asp:HyperLink ID="hplTenSanPham" runat="server" Text='<%# Eval("ProductName") %>' CssClass="mslink" Font-Bold="True" ToolTip="Xem chi tiết" NavigateUrl='<%# "~/Apps/ProductDetail.aspx?pid=" + DataBinder.Eval(Container.DataItem,"ProductID").ToString() %>'></asp:HyperLink>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="Label1" runat="server" Text="Giá:" CssClass="text_header"></asp:Label>
                                    <asp:Label ID="lblGia" runat="server" 
                                        Text='<%# Eval("SalePrice", "{0:0,0}") + " VNĐ" %>'
                                        Visible='<%# Eval("VisablePrice") %>' CssClass="Price"></asp:Label>
                                    <strong>
                                    </strong></td>
                                <td align="right">
                                </td>
                                <td>
                                    <asp:ImageButton ID="imgbtnAddToCart" runat="server" ImageUrl="~/Images/addtocart.gif" CommandArgument='<%# Eval("ProductID") %>' CommandName="Select" /></td>
                            </tr>
                        </table>
                </ItemTemplate>
                <LoadingPanelStyle ImageSpacing="3px">
                </LoadingPanelStyle>
                <PagerSettings>
                    <AllButton>
                        <Image Height="15px" Width="21px" />
                    </AllButton>
                    <FirstPageButton>
                        <Image Height="15px" Width="21px" />
                    </FirstPageButton>
                    <LastPageButton>
                        <Image Height="15px" Width="21px" />
                    </LastPageButton>
                    <NextPageButton>
                        <Image Height="15px" Width="16px" />
                    </NextPageButton>
                    <PrevPageButton>
                        <Image Height="15px" Width="16px" />
                    </PrevPageButton>
                </PagerSettings>
            </dxdv:ASPxDataView>
            <asp:SqlDataSource ID="SQLDSProducts" runat="server" ConnectionString="<%$ ConnectionStrings:DaiCuongMobileConnectionString %>"                
                SelectCommand="SELECT top 10 [ProductID], [ProductName], [PrductNameNoSign], [CategoryID], [SupplierID], [Price], [SalePrice], [Quantity], [VisablePrice], [Descriptions], [PublishDate], [PostDate], [SmallImageURL], [BigImageURL] FROM [tbProducts] ORDER BY [ProductID] DESC">
            </asp:SqlDataSource>     
	</div>
</div>